<?php
include '../../init.php';

if(!empty($_SESSION) && (@$_SESSION['is_login'] == true)){
	show_msg(1, '已经登录,请勿重复登录...', 3, '../../index.php');
	exit();
}

// 获取安全问题列表
$qarray = array();
$sql   = "SELECT qid,question FROM `safe_question_tb` ;";
if (!my_mysql_query($sql, $qarray)){
    echo '数据初始化失败';
    exit();
}


?>
<!DOCTYPE html>

<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>登录</title>

	<link rel="stylesheet" type="text/css" href="./css/style_3_common.css">
	<link rel="stylesheet" type="text/css" href="./css/style_3_member_logging.css">
	<link rel="stylesheet" id="css_widthauto" type="text/css" href="./css/style_3_widthauto.css">
	<!--插件全局js(gfan)-->
	<link rel="stylesheet" type="text/css" id="gfan_css" href="./css/gfan_bbs.css">
    
	<style type="text/css">
	#main-body {
		width: 960px;
		margin: 25px auto;
	}
	</style>
</head>

<body>
	<div id="main-body">
		<div id="ct" class="ptm w cl">
			<div class="mn" id="main_message">
				<div class="bm" style="background-color: white;">
					<div class="bm_h bbs">
						<span class="y">
							<a href="../register/index.php" class="xi2">没有帐号？注册</a>
						</span>
						<h3 class="xs2"><a href="../../index.php">首页</a>&nbsp;<em>></em>&nbsp;登录</h3>
					</div>
					<div>
						<div id="main_messaqge_Lyel8">
							<div id="layer_login_Lyel8">
								<h3 class="flb">
									<em id="returnmessage_Lyel8">
									</em>
									<span></span>
								</h3>
								<form method="post" autocomplete="off" name="login" id="loginform_Lyel8" class="cl" action="./login.php">
									<div class="c cl">
										<div class="rfm">
											<table>
												<tbody>
													<tr>
														<th>
															<span class="login_slct">
																<a href="javascript:;" id="loginfield_Lyel8_ctrl" style="width:45px" tabindex="1">用户名</a>
															</span>
														</th>
														<td>
															<input type="text" name="account" id="username_Lyel8" autocomplete="off" size="30" class="px p_fre" tabindex="1" value="">
														</td>
														<td class="tipcol"><a href="../register/index.php">注册</a></td>
													</tr>
												</tbody>
											</table>
										</div>
										<div class="rfm">
											<table>
												<tbody>
													<tr>
														<th>
															<label for="password3_Lyel8">密码:</label>
														</th>
														<td>
															<input type="password" id="password3_Lyel8" name="password" onfocus="clearpwd()" size="30" class="px p_fre" tabindex="1">
														</td>
														<td class="tipcol"></td>
													</tr>
												</tbody>
											</table>
										</div>
										<div class="rfm">
											<table>
												<tbody>
													<tr>
														<th>安全提问:</th>
														<td>
															<select id="loginquestionid_Lyel8" width="213" name="questionid">
                                                            <?php 
                                                            foreach($qarray as $value){
                                                                echo '<option value="'.$value['qid'].'">'.$value['question'].'</option>';
                                                            }
                                                            ?>
															</select>
														</td>
													</tr>
												</tbody>
											</table>
										</div>
										<div class="rfm" id="loginanswer_row_Lyel8">
											<table>
												<tbody>
													<tr>
														<th>答案:</th>
														<td>
															<input type="text" name="answer" id="loginanswer_Lyel8" autocomplete="off" size="30" class="px p_fre" tabindex="1">
														</td>
													</tr>
												</tbody>
											</table>
										</div>
										<div class="rfm">
											<table>
												<tbody>
													<tr>
														<th>验证码: </th>
														<td>
															<input name="login_validate_code" id="seccodeverify_S0" type="text" autocomplete="off" style="ime-mode:disabled;width:100px" class="txt px vm" tabindex="1">
															<span id="checkseccodeverify_S0"><img src="./image/none.gif" width="16" height="16" class="vm"></span>
															<br>
															<span id="seccode_S0">请输入下面动画图片中的字符
															<br>
															<img width="150" height="50" src="../../common/make_code.php?codeType=login" class="vm" alt="点击图片切换" onclick="this.src='../../common/make_code.php?codeType=login&'+Date.now()" style="cursor: pointer;">
															</span>
														</td>
													</tr>
												</tbody>
											</table>
										</div>
										<div class="rfm ">
											<table>
												<tbody>
													<tr>
														<th></th>
														<td>
															<label for="cookietime_Lyel8">
																<input type="checkbox" name="remember" tabindex="1" value="1">记住一周
																</label>
														</td>
													</tr>
												</tbody>
											</table>
										</div>
											<div class="rfm mbw bw0">
												<table width="100%">
													<tbody>
														<tr>
															<th>&nbsp;</th>
															<td>
																<button class="pn pnc" type="submit" name="loginsubmit" value="true" tabindex="1"><strong>登录</strong></button>
															</td>
															<td>
															</td>
														</tr>
													</tbody>
												</table>
											</div>
										</div>
									</form>
								</div>
								<div id="layer_lostpw_Lyel8" style="display: none;">
									<h3 class="flb">
										<em id="returnmessage3_Lyel8">找回密码</em>
										<span></span>
									</h3>
									<form method="post" autocomplete="off" id="lostpwform_Lyel8" class="cl" action="#">
										<div class="c cl">
											<input type="hidden" name="formhash" value="3aa1720f">
											<input type="hidden" name="handlekey" value="lostpwform">
											<div class="rfm">
												<table>
													<tbody>
														<tr>
															<th><span class="rq">*</span>
																<label for="lostpw_email">Email:</label>
															</th>
															<td>
																<input type="text" name="email" id="lostpw_email" size="30" value="" tabindex="1" class="px p_fre">
															</td>
														</tr>
													</tbody>
												</table>
											</div>
											<div class="rfm">
												<table>
													<tbody>
														<tr>
															<th>
																<label for="lostpw_username">用户名:</label>
															</th>
															<td>
																<input type="text" name="username" id="lostpw_username" size="30" value="" tabindex="1" class="px p_fre">
															</td>
														</tr>
													</tbody>
												</table>
											</div>
											<div class="rfm mbw bw0">
												<table>
													<tbody>
														<tr>
															<th></th>
															<td>
																<button class="pn pnc" type="submit" name="lostpwsubmit" value="true" tabindex="100"><span>提交</span></button>
															</td>
														</tr>
													</tbody>
												</table>
											</div>
										</div>
									</form>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</body>

	</html>
